fix(coverage): validate nested npm metadata through canonical pins - #807
fix(coverage): validate nested npm metadata through canonical pins#807seonghobae wants to merge 24 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Implement the bounded GREEN slice on exact current head Apply the permanent tests and minimal production changes already specified by the branch contract:
Keep Draft and do not approve, merge, release, or change reviewer credentials. |
|
Release blocker: current branch contains only a trigger and branch-materialization workflows ( @opencode-agent address Remove every trigger, self-removing materializer, encoded patch, and branch-writing helper from the final tree. Preserve the test-first intent, but publish the four permanent implementation/test/doctoring/changelog files through ordinary reviewed commits. The final production rule may accept a metadata-only nested npm v2/v3 location only when one canonical root package with the same normalized identity and exact version has a valid public npm-registry tarball and SHA-512 SRI. Continue to reject missing canonical metadata, version mismatch, partial pins, malformed scoped identities, non-registry origins, userinfo/query/fragment/port abuse, invalid SRI, conflicting complete pins, unsafe paths, and links. Consume the lock unchanged; do not repair or synthesize metadata. Require exact-head Python 3.10/3.14 tests, 100% production statement/branch/docstring evidence, compilation, all security/supply-chain checks, current-head review, and independent approval before Ready. |
|
@jules Replace the trigger/materializer-only scope on exact live head Delete Implement the narrow npm v2/v3 rule directly: a metadata-only nested Add the BandScope-shaped positive case and every stated negative case. Run Python 3.10/3.14, focused and complete central tests, 100% production statement/branch/public-docstring coverage, Ruff, compileall, workflow contract, security and supply-chain checks, and |
|
/oc Fix the current exact-head failure directly in permanent source; do not rely on, add, or retain a one-shot/branch-writer workflow. The Python 3.14 quality run proves 12 focused failures because
Add the APA 7 doctoring and CHANGELOG entry, remove |
|
@opencode-agent address The branch has been restored to a reviewable TDD state at exact head Implement the permanent change directly in
Keep |
|
@opencode-agent address Implement the permanent production change on exact current Draft head Apply the minimal two-pass validator:
Add Run: python -m coverage erase
python -m coverage run --branch -m pytest -q \
tests/test_materialize_base_javascript_packages.py \
tests/test_npm_nested_metadata_lock_validation.py
python -m coverage report \
--include=scripts/ci/materialize_base_javascript_packages.py \
--show-missing --fail-under=100
python -m interrogate scripts/ci
python -m compileall -q scripts/ci tests
pytest -qThen rerun exact-head CodeQL, Python Security, SAST, Security Scan, Secret Scan, OSV, Scorecard, SBOM, CodeRabbit/OpenCode/Noema, and keep Draft until all evidence is current and a qualifying independent approval exists. |
|
@opencode-agent address Exact head Implement the minimum permanent production correction directly in
Add the permanent production tests to the authoritative existing module, complete public docstrings, APA 7 doctoring and |
|
@opencode-agent address Implement the permanent GREEN production change for exact head Update
Then add authoritative npm v11 package-lock doctoring with APA 7 primary-source references and |
|
/opencode Continue directly on The permanent tests are present and the unsafe patcher has been removed. Implement the smallest ordinary source/docs/changelog change in
Run |
|
@opencode-agent Fix the current exact-head quality failure on Run Required repair:
Keep Draft until fresh exact-head quality/security/review/approval gates pass. Do not approve, merge, tag, release, or publish. |
|
/oc Close the remaining exact-head coverage deficit on Add focused executable tests that exercise each real fail-closed/loop-control path, including the remaining malformed/empty package identity path, canonical-location iteration paths that skip ineligible/link/version-mismatched candidates before a later valid candidate or terminal failure, and the uncovered nested-entry rejection at line 281. Where an arc is demonstrably impossible after an earlier invariant, simplify the production control flow rather than adding Then run the focused suite under branch coverage with 100% required, production docstrings, Python 3.10/3.14 compilation, complete central tests/coverage, and |
Problem
Central changed-head npm-lock validation currently requires every non-link
node_moduleslocation to repeat its own registry tarball and SHA-512 integrity. npm v3 can serialize workspace or peer locations with only version/classification metadata while one canonical package location carries the actual artifact pin. BandScope's validapps/desktop/node_modules/@types/react-domentry therefore blocks central coverage even though the canonical root entry is hash-bounded.Intended focused contract
CHANGELOG.md;TDD state
A bounded self-removing workflow on the branch adds the permanent tests, proves the BandScope-shaped case fails against current protected
main, applies the minimal production change, executes the full central quality suite, removes itself, and publishes only the four permanent source/test/documentation files. Keep Draft until that workflow-free exact head exists.Standards basis
The decision follows npm CLI v11's official
package-lock.jsonformat, which definespackagesas location-keyed descriptors and explicitly notes that some dependency locations may omit artifact fields while retaining metadata. The central policy remains stricter than generic npm by requiring every accepted metadata-only location to resolve to one exact canonical public-registry SHA-512 pin.Merge gate
No predecessor-head evidence is accepted. Require workflow-free current head, full central tests, 100% production statement/branch/docstring evidence, compilation, Ruff, all security/supply-chain gates, OpenCode, Noema, CodeRabbit, zero actionable threads, a qualifying non-author approval, and branch protection without bypass.
Refs ContextualWisdomLab/bandscope#751 and #748.